/*
 * @Author: henan 1071780426@qq.com
 * @Date: 2024-06-03 10:17:48
 * @LastEditors: 贺楠 1071780426@qq.com
 * @LastEditTime: 2024-07-04 17:19:26
 * @FilePath: \bigHome\src\views\HomePage\comprehensiveHome\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import TableLyout from '@/components/commonPublic/PageLyout.vue';
import companyLayout from '@/components/HomePage/companyLayout/index.vue';
// import projectLayout from '@/components/HomePage/projectLayout/index.vue';


import API from '@/utils/requestCommon.js';
export default {
    name: "comprehensiveHome",
    components: {
        TableLyout,
        companyLayout, //项目
        // projectLayout, //标段
    },
    data() {
        return {
            companyTreeData: [],
            searchObj: [{
                datePickerIsRange: true, //是input
                label: ".", //字段
                prop: "timeDates", //字段名
                width: 1, //参考el-col
                disabled: false, //是否禁用
                placeholder: "进场时间",
            }],
            isCompanyShow: true,
            clickData:null,//点击左侧树状图
        }
    },
    mounted() {
        // console.log(544545,API);
        API.getTree().then((res) => {

            if (res.length > 0) {
                this.companyTreeData = res;
            }
        }).catch((err) => {
            console.log(err)
        })
    },
    methods: {
        // 点击左侧树状图
        handleNodeClick(data) {
            // console.log(data);
            this.clickData=data;
            if (data.fNature == '建设单位' || data.fNature == '总监办') {
                this.isCompanyShow = true;
            } else if (data.fNature == '集团公司') {
                console.log(data.fNature);
            } else if (data.fNature == '施工单位') {
                this.isCompanyShow = false;
            }
            console.log(data);
        }
    }
}